package com.sun.androidexerciseproject.function.firebase;

import android.os.Bundle;

import com.google.firebase.analytics.FirebaseAnalytics;
import com.sun.androidexerciseproject.function.app.MyApplication;

/**
 * Description:
 * File: UploadLog.java
 * Author: Administrator
 * Create: 2019/6/20 0020 上午 11:08
 */
public class UploadLog {
    private static FirebaseAnalytics firebaseAnalytics = FirebaseAnalytics.getInstance(MyApplication.getContext());

    /**
     * 发送日志
     *
     * @param content
     */
    public static void sendLog(String content) {
        Bundle bundle = new Bundle();
        bundle.putString("log", content);
        if (null != firebaseAnalytics) {
            firebaseAnalytics.logEvent("log", bundle);
        }

    }
}
